package com.example.designpatterns.visitor;

public class ConcreteVisitor implements Visitor {
    @Override
    public void visit(ElementA elementA) {
        System.out.println("访问者正在访问 ElementA: " + elementA.operationA());
    }

    @Override
    public void visit(ElementB elementB) {
        System.out.println("访问者正在访问 ElementB: " + elementB.operationB());
    }
} 